var sys = require("sys"),
    fs = require('fs'),
    f = "test.txt",
    startByte = 0;

fs.stat(f, function(err, stats){
  if (err) throw err;
  startByte = stats.size;
  sys.puts(startByte);
});

fs.watchFile(f, function (curr, prev) {
  fs.stat(f, function(err, stats){
    if (err) throw err;
    fs.createReadStream(f, {
      start: startByte,
      end: stats.size
    }).addListener("data", function(lines) {
      sys.puts(lines);
      startByte = stats.size;
    });
  });
});


